<?php

namespace app\common\validate\Depot;

use think\Validate;

class Supplier extends Validate
{
    protected $rule = [
        'name' => ['require', 'unique:depot_supplier'],
        'mobile' =>['require', 'unique:depot_supplier'],
        'province' => ['require'],
        'city' => ['require'],
        'district' => ['require'],
        'address' => ['require'],

    ];

    // 错误提示信息
    protected $message = [
        'name.require' => '供应商名称必填',
        'name.unique' => '供应商名称已存在',
        'mobile.require' => '供应商手机号必填',
        'mobile.unique' => '供应商手机号已存在',
        'province.require' => '省份必填',
        'city.require' => '城市必填',
        'district.require' => '区域必填',
        'address.require' => '详细地址必填',

    ];
}
